<?php
/*
 * @Author: your name
 * @Date: 2021-11-03 15:16:15
 * @LastEditTime: 2022-01-16 21:44:24
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \property\app\Models\admin_model\Column.php
 */

namespace App\Models\admin_model;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;

class DailyParttimeUser extends Model
{
    use HasFactory;
    static string $tableName = 'daily_parttime_user';
     
    public static function   list($whereStr = '' , $limitStr = ''){
        return DB::select(" SELECT `daily_parttime_user`.*,`admins`.`nickName` as `admins_nickName` FROM ".self::$tableName." LEFT JOIN `admins` ON `daily_parttime_user`.`customerAdmins_id` = `admins`.`id`   ".$whereStr.$limitStr);
    }

    public static function count( $whereStr = ''){
        return DB::select(" SELECT COUNT(*) AS `count` FROM ".self::$tableName."   ".$whereStr);
    }
    
}
